<html xmlns="http://www.w3.org/1999/xhtml"
	xmlns:h="http://java.sun.com/jsf/html"
	xmlns:f="http://java.sun.com/jsf/core"
        xmlns:c="http://java.sun.com/jstl/core" 
        xmlns:p="http://primefaces.org/ui"
        xmlns:ui="http://java.sun.com/jsf/facelets"
        
        >

    <ui:composition template="template.xhtml">
        <ui:define name="content">
            
                <div id="body">
        <div class="panel">

            <h2>Items found for keyword :
                <h:outputText value="#{catalog.keyword}"/>
            </h2>

            <h:messages layout="table" styleClass="error"/>

            <h:form>
                <p:dataTable value="#{catalog.items}" var="item">
                    <p:column>
                        <p:commandLink action="#{catalog.doFindItem}">
                            <h:outputText value="#{item.name}"/>
                            <f:param name="itemId" value="#{item.id}"/>
                        </p:commandLink>
                    </p:column>
                    <p:column>
                        <i>(
                            <h:outputText value="#{item.product.category.name}"/>
                            -
                            <h:outputText value="#{item.product.name}"/>
                            )</i>
                    </p:column>
                    <p:column>
                        <h:outputText value="#{item.unitCost}"/>
                        $
                    </p:column>
                </p:dataTable>
            </h:form>
        </div>
    </div>
            
            
        </ui:define>    
    </ui:composition>
    
    
    
    
</html>
